home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / OSAGeneric.a < prev    next >
Text File  |  1996-05-01  |  4KB  |  146 lines

  1. ;
  2. ;    File:        OSAGeneric.a
  3. ;
  4. ;    Contains:    AppleScript Generic Component Interfaces.
  5. ;
  6. ;    Version:    Technology:    AppleScript 1.1
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__OSAGENERIC__') = 'UNDEFINED' THEN
  19. __OSAGENERIC__ SET 1
  20.  
  21.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  22.     include 'Errors.a'
  23.     ENDIF
  24.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  25.     include 'AppleEvents.a'
  26.     ENDIF
  27.     IF &TYPE('__OSA__') = 'UNDEFINED' THEN
  28.     include 'OSA.a'
  29.     ENDIF
  30.     IF FOR_SYSTEM7_ONLY THEN
  31. ;
  32. ;     NOTE:    This interface defines a "generic scripting component."
  33. ;            The Generic Scripting Component allows automatic dispatch to a
  34. ;            specific scripting component that conforms to the OSA interface.
  35. ;            This component supports OSA, by calling AppleScript or some other 
  36. ;            scripting component.  Additionally it provides access to the default
  37. ;            and the user-prefered scripting component.
  38. ;
  39.  
  40.                                                             ; Component version this header file describes 
  41. kGenericComponentVersion        EQU        $0100
  42.  
  43. kGSSSelectGetDefaultScriptingComponent EQU $1001
  44. kGSSSelectSetDefaultScriptingComponent EQU $1002
  45. kGSSSelectGetScriptingComponent    EQU        $1003
  46. kGSSSelectGetScriptingComponentFromStored EQU $1004
  47. kGSSSelectGenericToRealID        EQU        $1005
  48. kGSSSelectRealToGenericID        EQU        $1006
  49. kGSSSelectOutOfRange            EQU        $1007
  50. ; typedef OSType                         ScriptingComponentSelector
  51.  
  52. ; typedef OSAID                         GenericID
  53.  
  54. ;  get and set the default scripting component 
  55. ;
  56. ; pascal OSAError OSAGetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector *scriptingSubType)
  57. ;
  58.     IF ¨ GENERATINGCFM THEN
  59.         Macro
  60.         _OSAGetDefaultScriptingComponent
  61.             move.l              #$00041001,-(sp)
  62.             moveq               #0,D0
  63.             dc.w                $A82A
  64.         EndM
  65.     ELSE
  66.         IMPORT_CFM_FUNCTION OSAGetDefaultScriptingComponent
  67.     ENDIF
  68.  
  69. ;
  70. ; pascal OSAError OSASetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType)
  71. ;
  72.     IF ¨ GENERATINGCFM THEN
  73.         Macro
  74.         _OSASetDefaultScriptingComponent
  75.             move.l              #$00041002,-(sp)
  76.             moveq               #0,D0
  77.             dc.w                $A82A
  78.         EndM
  79.     ELSE
  80.         IMPORT_CFM_FUNCTION OSASetDefaultScriptingComponent
  81.     ENDIF
  82.  
  83. ;  get a scripting component instance from its subtype code 
  84. ;
  85. ; pascal OSAError OSAGetScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType, ComponentInstance *scriptingInstance)
  86. ;
  87.     IF ¨ GENERATINGCFM THEN
  88.         Macro
  89.         _OSAGetScriptingComponent
  90.             move.l              #$00081003,-(sp)
  91.             moveq               #0,D0
  92.             dc.w                $A82A
  93.         EndM
  94.     ELSE
  95.         IMPORT_CFM_FUNCTION OSAGetScriptingComponent
  96.     ENDIF
  97.  
  98. ;  get a scripting component selector (subType) from a stored script 
  99. ;
  100. ; pascal OSAError OSAGetScriptingComponentFromStored(ComponentInstance genericScriptingComponent, const AEDesc *scriptData, ScriptingComponentSelector *scriptingSubType)
  101. ;
  102.     IF ¨ GENERATINGCFM THEN
  103.         Macro
  104.         _OSAGetScriptingComponentFromStored
  105.             move.l              #$00081004,-(sp)
  106.             moveq               #0,D0
  107.             dc.w                $A82A
  108.         EndM
  109.     ELSE
  110.         IMPORT_CFM_FUNCTION OSAGetScriptingComponentFromStored
  111.     ENDIF
  112.  
  113. ;  get a real component instance and script id from a generic id 
  114. ;
  115. ; pascal OSAError OSAGenericToRealID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance *theExactComponent)
  116. ;
  117.     IF ¨ GENERATINGCFM THEN
  118.         Macro
  119.         _OSAGenericToRealID
  120.             move.l              #$00081005,-(sp)
  121.             moveq               #0,D0
  122.             dc.w                $A82A
  123.         EndM
  124.     ELSE
  125.         IMPORT_CFM_FUNCTION OSAGenericToRealID
  126.     ENDIF
  127.  
  128. ;  get a generic id from a real component instance and script id 
  129. ;
  130. ; pascal OSAError OSARealToGenericID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance theExactComponent)
  131. ;
  132.     IF ¨ GENERATINGCFM THEN
  133.         Macro
  134.         _OSARealToGenericID
  135.             move.l              #$00081006,-(sp)
  136.             moveq               #0,D0
  137.             dc.w                $A82A
  138.         EndM
  139.     ELSE
  140.         IMPORT_CFM_FUNCTION OSARealToGenericID
  141.     ENDIF
  142.  
  143.     ENDIF
  144.     ENDIF ; __OSAGENERIC__ 
  145.  
  146.